﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Popup_Approval.aspx.cs"
    Inherits="SAP.Popup_Approval" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="/js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="/js/main.js"></script>
     <script type="text/javascript" src="/js/dialog.js"></script>
    <link href="skin/skin.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style2
        {
            width: 250px;
        }
        .style3
        {
            width: 154px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManagerEditItem" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="editItemUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="True">       
        <ContentTemplate>

        <div>

            <table style="width:100%;">
                <tr>
                    <td class="style3">
                        Request Number:</td>
                    <td class="style2">
                        <asp:Label ID="lb_ReqNumber" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        Request Name:</td>
                    <td class="style2">
                        <asp:Label ID="lb_RequestName" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        Type:</td>
                    <td class="style2">
                        <asp:Label ID="lb_ReqType" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        Date:</td>
                    <td class="style2">
                        <asp:Label ID="lb_ReqDate" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                 <tr>
                    <td class="style3">
                        From Store:</td>
                    <td class="style2">
                        <asp:Label ID="lb_FromStore" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>

                 <tr>
                    <td class="style3">
                        To Store:</td>
                    <td class="style2">
                        <asp:Label ID="lb_ToStore" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

        </div>
            
            <asp:ImageButton ID="ib_Approve" runat="server" OnClientClick="Dialog.showLoader();" 
                ImageUrl="~/skin/images/SAP_Approve.png" onclick="ib_Approve_Click" />

            <asp:ImageButton ID="ib_Eject" runat="server" OnClientClick="Dialog.showLoader();"
                ImageUrl="~/skin/images/SAP_Eject.png" onclick="ib_Eject_Click" />
            
            <br />

            <br />
            <asp:Label ID="lb_Message" runat="server" ForeColor="#CC3300" Text="."></asp:Label>

            <br />
            <div style="overflow:auto;height:200px;">

                            <asp:ListView ID="lvContents" runat="server" OnItemInserted="lvContents_ItemInserted"
                                OnItemCommand="lvContents_ItemCommand" OnItemUpdating="lvContents_ItemUpdating"
                                ViewStateMode="Enabled" OnItemEditing="lvContents_ItemEditing">
                                <LayoutTemplate>
                                    <table class="data_table">
                                        <tr>
                                            <th id="thButtons" runat="server" style="width: 100px">
                                            </th>

                                            <th style="width: 20px">
                                                <span>#</span>
                                            </th>
                                            
                                            <th style="display:none">
                                                <span>DetID</span>
                                            </th>

                                            <th style="width: 70px">
                                                <span>Item Code</span>
                                            </th>
                                            <th style="width: 200px">
                                                <span>Description</span>
                                            </th>
                                            <th style="width: 100px">
                                                <span>Unit</span>
                                            </th>
                                            <th style="width: 50px">
                                                <span>Quantity</span>
                                            </th>
                                           <%-- <th style="width: 80px">
                                                <span>Whse</span>
                                            </th>--%>
                                           
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:LinkButton ID="imgbEdit" runat="server" CommandName="Edit" Text="Edit" ImageUrl="~/skin/icon/edit_icon_mono.gif" />
                                            <asp:LinkButton ID="imgbDelete" runat="server" CommandName="DeleteItem" Text="Delete"
                                                ImageUrl="~/skin/icon/delete_icon_mono.gif" OnClientClick="return confirm('Are you sure you want to delete this row?');"
                                                ToolTip="Delete" />
                                        </td>

                                        <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblNo" Text='<%#Eval("No")%>'></asp:Label>
                                        </td>

                                        <td style="display:none">
                                            <asp:Label runat="server" ID="Label1" Text='<%#Eval("detID")%>'></asp:Label>
                                        </td>

                                        <td style="text-align: left">
                                            <%--<asp:HyperLink ID="litem" runat="server" NavigateUrl='<%# "../Inventory/ItemMasterData.aspx?itemcode=" + Eval("ItemCode").ToString() %>' >
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/skin/icon/link.png"/>                                            
                                            </asp:HyperLink>--%>
                                            <asp:Label runat="server" ID="lblCode"><%#Eval("ItemCode") %></asp:Label>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblDescription" ><%#Eval("Dscription")%></asp:Label>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblUnit" Text='<%# Eval("invntryuom") %>'></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:Label runat="server" ID="lblQuantity" Text='<%# Eval("Quantity") %>'></asp:Label>
                                        </td>
                                       <%-- <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblWhse"><%#Eval("WhsCode")%></asp:Label>
                                        </td>--%>
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:LinkButton ID="imgbUpdate" runat="server" CommandName="Update" Text="Update"
                                                ImageUrl="~/skin/icon/save_icon_mono.gif" CausesValidation="true" ValidationGroup="vgrpSaveContact" />
                                            <asp:LinkButton ID="imgbCancel" runat="server" CommandName="CancelUpdate" Text="Cancel"
                                                ImageUrl="~/skin/icon/undo_icon_mono.gif" CausesValidation="false" />
                                        </td>

                                        <td>
                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' />
                                        </td>
                                        <td style="display: none">
                                            <asp:Label ID="lbldetID" runat="server" Text='<%# Bind("detID") %>' />
                                        </td>
                                        <td style="text-align: left">
                                       <%--  NavigateUrl='WebForm3.aspx?tui=323'--%> 
                                            <asp:Label ID="lblCode" runat="server" Text='<%# Bind("ItemCode") %>' />
                                            <asp:HyperLink ID="linkItems"                                             
                                            NavigateUrl='<%# String.Format("javascript:openSingItemDialog({0})",Eval("No").ToString())%>'
                                            
                                                runat="server"> <asp:Image ID="imgItems" runat="server" ImageUrl="~/skin/images/item-pointer.gif" /></asp:HyperLink>
                                        </td>

                                        

                                        <%--'<%# String.Format("javascript:Main.openCustomDialog(\"../Popup_EditItem.aspx?id={0},600,610)", Eval("No").ToString()+"&requestType=1\"")%>'--%>


                                        <td style="text-align: left">
                                            <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("Dscription")%>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lbUnit"  runat="server" Text='<%#Eval("invntryuom")%>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtQuantity" Style="text-align: right" runat="server" Text='<%#Eval("Quantity")%>' />
                                        </td>
                                       <%-- <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblWhse" Text='<%#Bind("WhsCode")%>' />
                                            <asp:HyperLink ID="linkWarehouseLoad" NavigateUrl='<%# String.Format("javascript:Main.openDialog(\"../Popup_EditWareHouse.aspx\",{0})", "\"id=" + Eval("No").ToString()+"\"")%>'
                                                runat="server"> <asp:Image ID="imgWarehouseLoad" runat="server" ImageUrl="~/skin/images/item-pointer.gif" /></asp:HyperLink>
                                        </td>--%>
                                    </tr>
                                </EditItemTemplate>
                               
                                <EmptyDataTemplate>
                                    <table class="data_table">
                                        <tr>
                                            <th>
                                                <span>#</span>
                                            </th>

                                            <th style="display: none">
                                                <span>Det ID</span>
                                            </th>
                                            <th>
                                                <span>Item Code</span>
                                            </th>
                                            <th>
                                                <span>Item Description</span>
                                            </th>
                                            <th>
                                                <span>Unit</span>
                                            </th>
                                            <th>
                                                <span>Quantity</span>
                                            </th>
                                            
                                           <%-- <th>
                                                <span>Whse</span>
                                            </th>--%>
                                            
                                           
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>

            </div>
            <div>
                
            </div>
            <div>
                <asp:Label ID="lbSimulateData" runat="server" Text="Simulate Data For Food Transfer: "></asp:Label>
            </div>
            <div id="fk" style="overflow:auto; height:200px">
                  
                   <asp:ListView ID="lvSimul" runat="server" ViewStateMode="Enabled">
                                <LayoutTemplate>
                                    <table class="data_table">
                                        <tr>
                                                                                     
                                            <th style="width: 200px">
                                                <span>Account</span>
                                            </th>
                                            <th style="width: 100px">
                                                <span>Debit</span>
                                            </th>
                                            <th style="width: 100px">
                                                <span>Credit</span>
                                            </th>
                                           
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>

                                        <td style="text-align: left">
                                            <asp:Label runat="server" ID="lbAcc" Text='<%#Eval("Account")%>'></asp:Label>
                                        </td>

                                        <td style="text-align: right">
                                            <asp:Label runat="server" ID="lbDebit" ><%#Eval("Debit")%></asp:Label>
                                        </td>

                                        <td style="text-align: right">
                                            <asp:Label runat="server" ID="lbCredit" Text='<%# Eval("Credit") %>'></asp:Label>
                                        </td>
                                        
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        
                                        <td>
                                            <asp:Label ID="lbAcc" runat="server" Text='<%# Bind("Account") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lbDebit" runat="server" Text='<%# Bind("Debit") %>' />
                                        </td>
                                        <td >
                                            <asp:Label ID="lbCredit" runat="server" Text='<%# Bind("Credit")%>' />
                                        </td>

                                    </tr>
                                </EditItemTemplate>
                               
                                <EmptyDataTemplate>
                                    <table class="data_table">
                                        <tr>
                                            <th>
                                                <span>Account</span>
                                            </th>
                                            <th>
                                                <span>Debit</span>
                                            </th>
                                            <th>
                                                <span>Credit</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>
            </div>

            <div id="progressloader">
                <div id="progressloader_dialog" class="progressloader_window">
                <asp:Image ID="Image1" runat="server" Height="42" Width="42" ImageUrl="~/skin/images/ajax-loader.gif" />
                </div>
                <div id="progressloader_mask">
                </div>
            </div>

        </ContentTemplate>
        <Triggers>
           
        </Triggers>
    </asp:UpdatePanel>
    
    </form>
</body>
</html>
